package cn.luckdou.system.model.country;

import org.apache.commons.lang.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 国家
 * </p>
 *
 * @author Dadou
 * @since 2017-10-12
 */
@TableName("tb_country")
public class Country extends Model<Country> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 中文全称
     */
	private String cname;
    /**
     * 中文简称
     */
	private String caname;
    /**
     * 英文全称
     */
	private String ename;
    /**
     * 英文简称
     */
	private String eaname;
    /**
     * 缩写
     */
	private String abbreviation;
    /**
     * 中文全称的拼音
     */
	@TableField("cname_py")
	private String cnamePy;
    /**
     * 国旗地址
     */
	@TableField("img_url")
	private String imgUrl;
    /**
     * 国家图标
     */
	@TableField("ioc_url")
	private String iocUrl;
    /**
     * 所属分类 0亚洲 1西亚非 2欧亚 3欧洲 4美大 5国际组织 6港澳
     */
	private Integer type;
    /**
     * 状态 1正常 0停用
     */
	private Integer status;
    /**
     * 创建时间
     */
	@TableField("created_time")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createdTime;
    /**
     * 修改时间
     */
	@TableField("updated_time")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date updatedTime;
    /**
     * 删除时间
     */
	@TableField("deleted_time")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date deletedTime;
	/**
	 * 无参构造方法
	 */
	public Country(){

	}

	public Country(String cname, String caname, String ename, String eaname, String abbreviation, Integer type) {
		this.cname = cname;
		this.caname = caname;
		this.ename = ename;
		this.eaname = eaname;
		this.abbreviation = abbreviation;
		this.type = type;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCname() {
		return cname;
	}

	public void setCname(String cname) {
		this.cname =StringUtils.isNotBlank(cname)?cname:null;
	}

	public String getCaname() {
		return caname;
	}

	public void setCaname(String caname) {
		this.caname =StringUtils.isNotBlank(caname)?caname:null;
	}

	public String getEname() {
		return ename;
	}

	public void setEname(String ename) {
		this.ename =StringUtils.isNotBlank(ename)?ename:null;
	}

	public String getEaname() {
		return eaname;
	}

	public void setEaname(String eaname) {
		this.eaname =StringUtils.isNotBlank(eaname)?eaname:null;
	}

	public String getAbbreviation() {
		return abbreviation;
	}

	public void setAbbreviation(String abbreviation) {
		this.abbreviation =StringUtils.isNotBlank(abbreviation)?abbreviation:null;
	}

	public String getCnamePy() {
		return cnamePy;
	}

	public void setCnamePy(String cnamePy) {
		this.cnamePy =StringUtils.isNotBlank(cnamePy)?cnamePy:null;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl =StringUtils.isNotBlank(imgUrl)?imgUrl:null;
	}

	public String getIocUrl() {
		return iocUrl;
	}

	public void setIocUrl(String iocUrl) {
		this.iocUrl =StringUtils.isNotBlank(iocUrl)?iocUrl:null;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}

	public Date getUpdatedTime() {
		return updatedTime;
	}

	public void setUpdatedTime(Date updatedTime) {
		this.updatedTime = updatedTime;
	}

	public Date getDeletedTime() {
		return deletedTime;
	}

	public void setDeletedTime(Date deletedTime) {
		this.deletedTime = deletedTime;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
